//
//  GSNewsListModel.m
//  GameSky
//
//  Created by lanou on 16/1/10.
//  Copyright © 2016年 NiRongfei. All rights reserved.
//

#import "GSNewsListModel.h"
#import "GSNewsChildElements.h"

@implementation GSNewsListModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"childElements"]) {
        NSMutableArray *tempArray = [NSMutableArray array];
        _childElementsArray = [NSMutableArray array];
        tempArray = value;
        for (NSDictionary *oneDic in tempArray) {
            GSNewsChildElements *chilidModel = [[GSNewsChildElements alloc]init];
            [chilidModel setValuesForKeysWithDictionary:oneDic];
            [_childElementsArray addObject:chilidModel];
        }
    }
    
    if ([key isEqualToString:@"thumbnailURLs"]) {
        _thumbnailURLsArray = value;
    }
    
    if ([key isEqualToString:@"badges"]) {
        _badgesArray = value;
    }
}

@end
